package d3_charset;

import java.io.*;

public class t4copy {
    public static void main(String[] args) throws Exception {
        //复制照片
        //1.创建输入输出流
        InputStream isr = new FileInputStream("D:\\wuyong\\AA1BAd5P.jfif");
        OutputStream osw = new FileOutputStream("D:\\wuyong\\bbb\\AA1BAd5P.jfif");//文本文件也可以复制，且不乱码

        //2.创建字节数组
        byte[] buffer = new byte[1024];
        int len;
        while((len=isr.read(buffer))>0){
            osw.write(buffer,0,len);
        }
        osw.close();
        isr.close();
        System.out.println("finish");
    }
}
